<?php
function active( $str,$selected ){
	if( isset($selected) ){
		if( is_array($selected)){
			if( isset($selected[ $str ])){
				return "ui-tabs-selected ui-state-active";
			}
		}
		else {
			if( $selected == $str )return "ui-tabs-selected ui-state-active";
		}
	}
}
?>

<div id="tabs" class="tabs-container ui-tabs ui-widget ui-widget-content ui-corner-all">
				
					<ul class="admin-navigation list-horizontal tabs-menu ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
						<li class="ui-state-default ui-corner-top <?php echo active('site',$selected )?>"><?php echo anchor('admin/site','Site' ); ?></li>
						<li class="ui-state-default ui-corner-top <?php echo active('images',$selected )?>"><?php echo anchor('admin/images','Images' ); ?></li>
						<li class="ui-state-default ui-corner-top <?php echo active('blog',$selected )?>"><?php echo anchor('admin/blog','Blog' ); ?></li>
					</ul>
<div id="admincontent" class="grid_12"	>
<?php if(isset($admincontent)){ echo $admincontent; }?>
</div>				
</div>
					